{template block/header}
<div id="bodywrap">
    <!--{if $_config['showlistbtns'] || $_config['showphotosearch']}-->
    <div class="filter">
        <!--{if $_config['showphotosearch']}-->
		<form id="photo_search" action="{link ctl=photos act=search}" method="post">
        <div class="search f_right ml10">
             <input type="hidden" name="album_id" value="{$album_info['id']}" />            
             <input type="text" name="sname" value="{$search['name']}" placeholder="{lang search_photos}" />
             <button type="submit" name="submit"></button>
        </div>
		<div class="f_right mt5">
             <label><input type="checkbox" name="searchtype" value="album" checked="checked" /> {lang current_album}</label>
        </div>
		</form>
        <!--{/if}-->
        <!--{if $_config['showlistbtns']}-->
        <div class="display_setting f_left">
            {$photo_col_menu}
			<ul class="tab show_type f_left">
				<li class="current tile"><a href="javascript:void(0);" title="{lang flat_mode}"><span class="png">&nbsp;</span></a></li>
				<li class="slideshow"><a href="{link ctl=photos act=slide aid=$album_info['id']}" title="{lang slide_mode}"><span class="png">&nbsp;</span></a></li>
			</ul>
        </div>
        <!--{/if}-->
    </div>
    <!--{/if}-->
    <!--{if $loggedin && $photos}-->
    <div class="admin_bar">
        <div class="f_left">
            <label><input type="checkbox" value="1" onclick="Madmin.check_all('.selitem',this.checked)" />{lang sel_all}</label> <span class="i_trash_sp sprite"></span> <a href="javascript:void(0)" onclick="Madmin.checked_action('.selitem','{link ctl=photos act=confirm_delete_batch}');">{lang delete_selected}</a> <span class="i_move_sp sprite"></span> <a href="javascript:void(0)" onclick="Madmin.checked_action('.selitem','{link ctl=photos act=move_batch}');">{lang move_selected}</a>
            {$photo_multi_opt}
        </div>
        <div class="f_right">
            <div class="bigbutton"><a href="{link ctl=upload act=multi aid=$album_info['id']}"><span>{lang upload_new_photo}</span></a></div>
        </div>
    </div>
    <!--{/if}-->
    <div class="album_desc">
    <!--{if $loggedin}-->
        <div class="inline_edit" title="{lang click_editable}" onclick="Madmin.inline_edit(this,'{link ctl=albums act=modify_desc_inline id=$album_info['id']}')"><!--{if $album_info['desc']}-->{$album_info['desc']}<!--{else}-->{lang no_album_desc}<!--{/if}-->
            <span class="i_editinfo sprite"></span>
        </div>
    <!--{else}-->
        <!--{if $album_info['desc']}-->
        <div class="inline">
            <!--{echo mycutstr(strip_tags($album_info['desc']),250,'... <a href="javascript:void(0)" onclick="$(\'.album_desc .inline_full\').show();$(\'.album_desc .inline\').hide();" class="blue">'.lang('show_all').'</a>')}-->
        </div>
        <div class="inline_full" style="display:none;">
            {$album_info['desc']}
        </div>
        <!--{/if}-->
    <!--{/if}-->
    </div>
    {$photo_sidebar}
    <table class="layout">
        <tr>
            <td class="left">
                <div class="mainbody">
                    <!--{if $photos}-->
                    <div class="innercol grid">
                        <div class="gallary_wrap">
                            <!--{loop $photos $k $v}-->
                            <div class="gallary_item">
                                <div class="item">
                                    <div class="pic_box">
                                        <table>
                                            <tr>
                                                <td>
                                                    {$v['img_thumb']}
                                                </td>
                                            </tr>
                                        </table>
                                        
                                    </div>
                                    <!--{if $loggedin}-->
                                    <div class="pic_ctl">
                                        <ul class="btns">
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=confirm_delete id=$v['id']}',true);" title="{lang move_to_trash}"><span class="i_littletrash sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=modify id=$v['id']}',true);" title="{lang modify}"><span class="i_edit sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=albums act=update_cover pic_id=$v['id']}');" title="{lang set_cover}"><span class="i_cover sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=rotate id=$v['id']}',true);" title="{lang rotate_image}"><span class="i_rotate sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=move id=$v['id']}',true);" title="{lang move_photo}"><span class="i_moveto sprite"></span></a></li>
                                            <li><a href="javascript:void(0)" onclick="Mui.box.show('{link ctl=photos act=reupload id=$v['id']}',true);" title="{lang reupload_photo}"><span class="i_reupload sprite"></span></a></li>
                                            <!--{$v['photo_control_icons']}-->
                                        </ul>
                                    </div>
                                    <!--{/if}-->
                                </div>
                                <div class="info">
                                    <div class="title">
                                    <!--{if $loggedin}--><input class="selitem" type="checkbox" name="sel_id[{$v['id']}]" value="1" /><span class="name"><a nid="{$v['id']}" title="{lang click_to_rename}" href="javascript:void(0)" onclick="Madmin.rename(this,'{link ctl=photos act=rename id=$v['id']}')">{$v['name']}</a></span>
                                    <!--{else}-->
                                    <span class="name"><a href="{link ctl=photos act=view id=$v['id']}">{$v['name']}</a></span>
                                    <!--{/if}-->
                                    </div>
                                    <div class="info_col">
                                        <p class="gray">{lang view_nums|`$v['hits']`} ,
                                        {if $show_takentime && $v['taken_time']}
                                        {lang in_taken_time}{echo date('Y-m-d',$v['taken_time'])}
                                        {else}
                                        {lang in_upload_time}{echo date('Y-m-d',$v['create_time'])}
                                        {/if}</p>
                                        <p><!--{if $v['comments_num'] && $enable_comment}--><a href="{link ctl=photos act=view id=$v['id']}#comments">{lang comments_num|`$v['comments_num']`}</a><!--{/if}--> <!--{if $v['is_cover']}--><span class="cover">{lang cover}</span><!--{/if}-->&nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <!--{/loop}-->
                            <div class="clear"></div>
                        </div>
                        <div class="paginator">
                            {$pagestr}
                        </div>
                        
                    {if $enable_comment}
                    <div class="comment_wrap">
                        <div class="bd-b">
                            <h2 class="hd bd-a">
                                {if $loggedin}
                                <span class="f_right" style="margin-top:7px;">
                                    {lang loginwith|<span class="gray">`$u_info['user_nicename']`</span>}<a href="{link ctl=users act=logout}"  onclick="Mui.box.show(this.href);return false;">{lang logout}</a> 
                                </span>
                                {/if}
                                <strong>{lang all_album_comments}</strong>
                                <span>{lang t_comments_num|`$album_info['comments_num']`}</span>
                            </h2>
                        </div>
                        <div class="innetcol">
                            <div class="comment_form bd-b">
                                <form id="album_comment_form" action="{link ctl=comments act=post}" method="post" onsubmit="return false;" class="bd-a">
                                    <input type="hidden" name="ref_id" value="{$ref_id}" />
                                    <input type="hidden" name="type" value="{$comments_type}" />
                                    {if $loggedin}
                                    <input type="hidden" name="email" value="{if isset($u_extrainfo['email'])}{$u_extrainfo['email']}{/if}" />
                                    <input type="hidden" name="author" value="{$u_info['user_nicename']}" />
                                    {else}
                                    <div class="field">
                                        <div class="label">{lang email}</div>
                                        <div class="ipts"><input type="text" class="inputstyle iptw2" name="email" /></div>
                                        <div class="clear"></div>
                                    </div>
                                    <div class="field">
                                        <div class="label">{lang comment_user} *</div>
                                        <div class="ipts"><input type="text" class="inputstyle iptw2" name="author" /></div>
                                        <div class="clear"></div>
                                    </div>
									{if $enable_comment_captcha}
                                    <div class="field">
                                        <div class="label">{lang captcha_code} *</div>
                                        <div class="ipts"><input type="text" class="inputstyle iptw1" name="captcha" /> <img src="{link ctl=captcha}" align="absmiddle" class="captcha" title="{lang click_to_reload}" onclick="reload_captcha(this)" /></div>
                                        <div class="clear"></div>
                                    </div>
                                    {/if}
                                    {/if}
                                    <div class="field">
                                        <div class="label">{lang comment_content} *</div>
                                        <div class="ipts"><textarea class="inputstyle ipttextarea" name="content"></textarea></div>
                                        <div class="clear"></div>
                                    </div>
                                    <div class="field">
                                        <div class="label"> &nbsp;</div>
                                        <div class="ipts"><input type="submit" name="submit" class="ylbtn f_left" value="{lang post_comments}" onclick="Mui.box.callback=function(){ reload_comments('{link ctl=comments act=more ref_id=$ref_id type=$comments_type}');$('#album_comment_form').get(0).reset(); };Mui.form.sendAuto('album_comment_form');" /></div>
                                        <div class="clear"></div>
                                    </div>
                                </form>
                            </div>
                            <div class="comment_list">
                                {template comments/more}
                            </div>
                            <div class="clear"></div>
                        </div>
                    {/if}
                    </div>
                    <!--{else}-->
                        <div class="no_data_info">
                            <!--{if $is_search}-->
                            <div class="pic no_photo_search png"></div>
                            <div class="data_msg">
                                <div>{lang no_photo_search_notice}</div >
                                <div class="button"><a href="{link ctl=photos act=index aid=$album_info['id']}">{lang all_photo_this_album}</a></div>
                            </div>
                            <div class="clear"></div>
                            <!--{else}-->
                            <div class="pic no_picture png"></div>
                            <div class="data_msg">
                                
                                <!--{if $loggedin}-->
                                <div>{lang no_photo_notice}</div >
                                <div class="button"><div class="bigbutton"><a href="{link ctl=upload act=multi aid=$album_info['id']}"><span>{lang upload_new_photo}</span></a></div></div>
                                <!--{else}-->
                                <div>{lang no_photo_notice_notlogin}</div >
                                <div class="button"><a href="{link ctl=albums}">{lang view_all_album}</a></div>
                                <!--{/if}-->
                            </div>
                            <!--{/if}-->
                            
                            <div class="clear"></div>
                        </div>
                    <!--{/if}-->
                </div>
            </td>
        </tr>
    </table>
</div>
{template block/footer}